//
//  LatestRecommendTableViewCell.m
//  HAODE
//
//  Created by LiYinDi on 15/12/30.
//  Copyright © 2015年 reabam.com. All rights reserved.
//

#import "LatestRecommendTableViewCell.h"

@implementation LatestRecommendTableViewCell

- (void)awakeFromNib {
    // Initialization code
    [self setAutoLayout];
}
-(void)setAutoLayout
{
    [_timeLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.top.equalTo(self.mas_top).with.offset(17);
        make.height.equalTo(@16);
        make.width.equalTo(@64);
    }];
    
    [_frameView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.centerX.equalTo(self.mas_centerX);
        make.top.equalTo(_timeLabel.mas_bottom).with.offset(15);
        
        make.left.equalTo(self.mas_left).with.offset(10);
        make.right.equalTo(self.mas_right).with.offset(-10);
        make.height.equalTo(_frameView.mas_width).dividedBy(1.67);
    }];
    
    [_productImageView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_frameView.mas_top).with.offset(3);
         make.left.equalTo(_frameView.mas_left).with.offset(3);
         make.right.equalTo(_frameView.mas_right).with.offset(-3);
//        make.height.equalTo(_frameView.mas_height).with.offset(-40);
        make.bottom.equalTo(_contentLabel.mas_top).with.offset(-15);
    }];
    
    [_contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
         make.top.equalTo(_productImageView.mas_bottom).with.offset(15);
        make.bottom.equalTo(_frameView.mas_bottom).with.offset(-15);
        make.left.equalTo(_frameView.mas_left).with.offset(9) ;
        make.right.equalTo(_productImageView.mas_right) ;
        make.height.equalTo(@15) ;
    }];
//    [self mas_makeConstraints:^(MASConstraintMaker *make) {
//        make.height.equalTo(_frameView.mas_height).with.offset(30);
//    }];
    
    
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
